<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/page/share/taglib.jsp"%>
<html>
<head>
<title>产品类别管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/css/vip.css" type="text/css">
<script language=JavaScript src="/js/FoshanRen.js"></script>
</head>

<script type="text/javascript">
	function toPage(page) {
		var form = document.forms[0];
		form.page.value = page;
		form.submit();
	}
</script>


<body bgcolor="#FFFFFF" text="#000000" marginwidth="0" marginheight="0">
<html:form action="/control/product/type/manage" method="post">
	<html:hidden property="page" />
	<html:hidden property="parentid" />
	<input type="hidden" name="method" value="list">
	<table width="98%" border="0" cellspacing="1" cellpadding="2"
		align="center">
		<tr>
			<td colspan="7" bgcolor="6f8ac4" align="right"><%@ include
				file="/WEB-INF/page/share/fenye.jsp"%></td>
		</tr>
		<tr>
			<td colspan="7" bgcolor="white" align="left"><c:if
				test="${!empty pageView.records}">
				所属父类: [${pageView.records[0].parent.name}] <a
					href='<html:rewrite action="/control/product/type/manage"/>?method=list&parentid=${pageView.records[0].parent.parent.typeId}'>返回</a>
			</c:if> <c:if test="${empty pageView.records}">
				暂无子类
			</c:if></td>
		</tr>
		<tr bgcolor="6f8ac4">
			<td width="8%">
			<div align="center"><font color="#FFFFFF">代号</font></div>
			</td>
			<td width="5%" nowrap >
			<div align="center"><font color="#FFFFFF">修改</font></div>
			</td>
			<td width="20%" >
			<div align="center"><font color="#FFFFFF">产品类别名称</font></div>
			</td>
			<td width="10%" >
			<div align="center"><font color="#FFFFFF">下级类别个数</font></div>
			</td>
			<td width="10%" nowrap >
			<div align="center"><font color="#FFFFFF">创建下级类别</font></div>
			</td>
			<td nowrap >
			<div align="center"><font color="#FFFFFF">备注</font></div>
			</td>
		</tr>
		<c:if test="${empty pageView.records}">
			<tr>
				<td bgcolor="f5f5f5" colspan="6" align="center">暂无子类别,请<a
					href='<html:rewrite action="/control/product/type/manage"/>?method=addUI&parentid=${param.parentid}'>添加
				</a> 或 <a
					href='<html:rewrite action="/control/product/type/manage"/>?method=list&parentid=${pageView.records[0].parent.typeId}'>返回</a>
				</td>
			</tr>
		</c:if>
		<!---------------------------LOOP START------------------------------>
		<c:forEach items="${pageView.records}" var="entry">
			<tr>
				<td bgcolor="f5f5f5">
				<div align="center">${entry.typeId}</div>
				</td>
				<td bgcolor="f5f5f5">
				<div align="center"><a href='<html:rewrite action="/control/product/type/manage"/>?method=editUI&typeid=${entry.typeId}'><img src="/images/edit.gif" width="15"
					height="16" border="0"></a></div>
				</td>
				<td bgcolor="f5f5f5">
				<div align="center">
				<c:if test="${fn:length(entry.childs) > 0}"><a
					href='<html:rewrite action="/control/product/type/manage"/>?method=list&parentid=${entry.typeId}'>${entry.name
				}</a>
				</c:if>
				<c:if test="${fn:length(entry.childs) <= 0}">
					${entry.name}
				</c:if>
				</div>
				</td>
				<td bgcolor="f5f5f5">${fn:length(entry.childs)}</td>
				<td bgcolor="f5f5f5">
				<div align="center"><a href='<html:rewrite action="/control/product/type/manage"/>?method=addUI&parentid=${entry.typeId}'>创建子类别</a></div>
				</td>
				<td bgcolor="f5f5f5">${entry.note}</td>
			</tr>
		</c:forEach>
		<!----------------------LOOP END------------------------------->
		<tr>
			<td colspan="7" bgcolor="6f8ac4" align="right"><%@ include
				file="/WEB-INF/page/share/fenye.jsp"%></td>
		</tr>
		<tr>
			<td bgcolor="f5f5f5" colspan="6" align="center">
			<table width="100%" border="0" cellspacing="1" cellpadding="3">
				<tr>
					<td width="5%"></td>
					<td width="85%"></td>
					<input name="AddDic" type="button" class="frm_btn" id="AddDic"
						onClick="javascript:window.location.href='<html:rewrite action="/control/product/type/manage"/>?method=addUI&parentid=${param.parentid}'"
						value="添加类别" />
					&nbsp;&nbsp;
					<input name="query" type="button" class="frm_btn" id="query"
						onClick="javascript:window.location.href='<html:rewrite action="/control/product/type/manage"/>?method=queryUI'"
						value=" 查 询 " />
					&nbsp;&nbsp;
				</tr>
			</table>
			</td>
		</tr>
	</table>
</html:form>
</body>
</html>